/*
 * ROM contents of К145ИК1306 serial arithmetic processor.
 * Using data from emu145 project by Felix Lazarev:
 * https://code.google.com/p/emu145/
 */
static const unsigned int ik1306_ucmd_rom[] = {
    0x0000000, 0x0800008, 0x0040020, 0x0800001,
    0x0800021, 0x0080020, 0x0A00028, 0x0040100,
    0x4000100, 0x0010100, 0x0A00101, 0x0201089,
    0x0213201, 0x0800004, 0x0800800, 0x0800820,
    0x0200088, 0x4810002, 0x0A00820, 0x0800400,
    0x0801000, 0x0100000, 0x8800004, 0x0008000,
    0x1400020, 0x0800005, 0x4000020, 0x0A00180,
    0x0100000, 0x4000001, 0x8241004, 0x0400000,
    0x0080001, 0x0040001, 0x0212801, 0x0200808,
    0x0800000, 0x0010020, 0x0A00808, 0x0040090,
    0x0A01008, 0x0800401, 0x0A00081, 0x0A01081,
    0x0803400, 0x0A01001, 0x0A11801, 0x0011001,
    0x0A10801, 0x0213801, 0x0098001, 0x0818001,
    0x0800420, 0x0880090, 0x0203C08, 0x0200809,
    0x0A00089, 0x0203090, 0x0840090, 0x0810002,
    0x0210801, 0x0210081, 0x0010000, 0x0200090,
    0x0210081, 0x0212801, 0x0A01020, 0x0A01020,
};

static const unsigned int ik1306_cmd_rom[256] = {
    0x0070000, 0x0060040, 0x0076A2F, 0x00B4C00,
    0x0090000, 0x00B4D00, 0x0090000, 0x0055300,
    0x0090000, 0x00B5400, 0x0090000, 0x0054600,
    0x0061000, 0x00B4800, 0x0065657, 0x0057300,
    0x0090000, 0x0075655, 0x0071700, 0x0060040,
    0x0070000, 0x0070000, 0x0074444, 0x00C4545,
    0x0280058, 0x0682825, 0x08A0000, 0x0280059,
    0x0800058, 0x0800059, 0x04D5F5F, 0x0FB2F22,
    0x0FB2F21, 0x0F80000, 0x0FB2F20, 0x0940000,
    0x0B80059, 0x0B80058, 0x0830000, 0x03D4343,
    0x0075E5E, 0x0075B00, 0x0695900, 0x007002B,
    0x0070028, 0x0070003, 0x0070028, 0x0070052,
    0x0070015, 0x00C0037, 0x00F5C00, 0x0075C01,
    0x0075D5D, 0x007285F, 0x0DC585B, 0x00C005C,
    0x0680000, 0x0070A0A, 0x0075B59, 0x0070254,
    0x02A5F5F, 0x0075F5F, 0x00B0076, 0x0077700,
    0x00B0039, 0x0063A2A, 0x01B3B2A, 0x0682828,
    0x0680000, 0x0F05800, 0x00B003D, 0x04A0000,
    0x0053200, 0x0502800, 0x0054E00, 0x0560000,
    0x0530000, 0x00B0076, 0x0077700, 0x03E5F5F,
    0x0DC0058, 0x0050032, 0x0682828, 0x005002A,
    0x0682C2C, 0x0682828, 0x0050039, 0x0682828,
    0x0682C2C, 0x0CA0025, 0x0070013, 0x0070066,
    0x0070014, 0x0070066, 0x0070014, 0x0F6005F,
    0x00B3E00, 0x0065300, 0x00B4E00, 0x0065300,
    0x0063B58, 0x0052A00, 0x0070058, 0x0184343,
    0x0FC7576, 0x00A2828, 0x0052A00, 0x0065300,
    0x00C0000, 0x0180000, 0x0682F2F, 0x0053C00,
    0x0065300, 0x00C0000, 0x0182F2F, 0x0680000,
    0x007042E, 0x0051600, 0x07A0000, 0x0070447,
    0x00B164B, 0x0770000, 0x00C3119, 0x0180000,
    0x007005D, 0x0DC585F, 0x0830000, 0x0680000,
    0x0695E5E, 0x0830000, 0x0680000, 0x00A0009,
    0x00B0016, 0x00B0061, 0x0185A5A, 0x0075866,
    0x0F00900, 0x0840004, 0x0052F26, 0x068002F,
    0x0680027, 0x0056D00, 0x0180000, 0x0920000,
    0x0F00959, 0x0180000, 0x00A0000, 0x0B50015,
    0x0070011, 0x0070052, 0x0070066, 0x0070001,
    0x0070001, 0x0070066, 0x0070001, 0x0070066,
    0x0070001, 0x0070001, 0x0070066, 0x0070001,
    0x0070066, 0x0070002, 0x0070066, 0x0070001,
    0x0075D5D, 0x0070052, 0x0075D5D, 0x0075D5D,
    0x0590003, 0x00A5A00, 0x00B2A00, 0x01C7400,
    0x00B3F00, 0x0185E00, 0x00B7458, 0x0B2005F,
    0x0F00947, 0x0AE0000, 0x00B5E63, 0x0090000,
    0x0186B2C, 0x00C006E, 0x0180000, 0x0180001,
    0x0072828, 0x00B3000, 0x0680000, 0x00C3636,
    0x0C10000, 0x0F07259, 0x0A90000, 0x0C45F00,
    0x0073131, 0x0A95A5A, 0x0C45A5A, 0x0680000,
    0x00A0000, 0x0690059, 0x0CA2C00, 0x0DC5931,
    0x0DC596B, 0x08D0000, 0x00A5A5A, 0x007000E,
    0x0072E2E, 0x0074242, 0x0073334, 0x00B6265,
    0x0DB5E5E, 0x0070064, 0x007075F, 0x0075F51,
    0x00B1A03, 0x00F0051, 0x0D40068, 0x0075F5F,
    0x0070052, 0x0070065, 0x0CF0038, 0x0180067,
    0x00A4242, 0x005004E, 0x0070051, 0x0066000,
    0x0065300, 0x005004F, 0x0065300, 0x0064650,
    0x005004F, 0x0070050, 0x0070059, 0x0070052,
    0x01B353E, 0x005002A, 0x0070058, 0x007000E,
    0x0063B51, 0x005004E, 0x0075800, 0x0184343,
    0x00A4242, 0x0066000, 0x0063B00, 0x0070000,
    0x0075000, 0x0605259, 0x0837125, 0x0680000,
    0x0070023, 0x0070024, 0x0072F29, 0x0070041,
    0x1060040, 0x0074900, 0x0075F5F, 0x0094A4A,
};

static const unsigned char ik1306_prog_rom[128*9] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x2C, 0x2A, 0x27, 0x13, 0x2B, 0x27, 0x13, 0x2B, 0x27,
    0x34, 0x2A, 0x27, 0x13, 0x2B, 0x27, 0x13, 0x2B, 0x27,
    0x29, 0x2A, 0x35, 0x29, 0x2B, 0x35, 0x29, 0x2B, 0x35,
    0x29, 0x12, 0x35, 0x29, 0x3F, 0x35, 0x29, 0x3F, 0x35,
    0x2E, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x2A, 0x02, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x03, 0x12, 0x05, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x0E, 0x02, 0x00, 0x24, 0x02, 0x00, 0x24, 0x02, 0x00,
    0x30, 0x1D, 0x05, 0x2F, 0x1D, 0x00, 0x00, 0x1D, 0x00,
    0x22, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x0C, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x00,
    0x31, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F,
    0x0E, 0x34, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00,
    0x18, 0x25, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00,
    0x1B, 0x03, 0x39, 0x00, 0x00, 0x00, 0x14, 0x18, 0x00,
    0x36, 0x00, 0x00, 0x03, 0x0B, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00,
    0x37, 0x1E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00,
    0x01, 0x06, 0x07, 0x01, 0x06, 0x07, 0x01, 0x06, 0x07,
    0x34, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x3C, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x3E, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x00, 0x00,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x01, 0x25, 0x00, 0x01, 0x25, 0x00, 0x24, 0x02, 0x00,
    0x03, 0x04, 0x02, 0x03, 0x04, 0x02, 0x24, 0x02, 0x00,
    0x01, 0x06, 0x07, 0x01, 0x06, 0x07, 0x24, 0x02, 0x00,
    0x01, 0x04, 0x08, 0x01, 0x04, 0x08, 0x24, 0x00, 0x1A,
    0x03, 0x06, 0x09, 0x03, 0x06, 0x09, 0x24, 0x00, 0x02,
    0x03, 0x25, 0x00, 0x03, 0x25, 0x00, 0x24, 0x25, 0x00,
    0x03, 0x00, 0x38, 0x03, 0x00, 0x0B, 0x03, 0x25, 0x00,
    0x24, 0x25, 0x00, 0x24, 0x25, 0x0E, 0x05, 0x00, 0x00,
    0x03, 0x25, 0x00, 0x03, 0x25, 0x00, 0x03, 0x25, 0x00,
    0x00, 0x00, 0x19, 0x05, 0x00, 0x19, 0x05, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x12,
    0x00, 0x21, 0x00, 0x00, 0x21, 0x24, 0x25, 0x03, 0x25,
    0x00, 0x0D, 0x02, 0x00, 0x0D, 0x02, 0x00, 0x0D, 0x02,
    0x00, 0x17, 0x00, 0x00, 0x17, 0x24, 0x05, 0x00, 0x00,
    0x24, 0x00, 0x05, 0x24, 0x00, 0x05, 0x24, 0x00, 0x05,
    0x24, 0x25, 0x00, 0x24, 0x25, 0x00, 0x24, 0x25, 0x00,
    0x13, 0x0A, 0x00, 0x00, 0x03, 0x0B, 0x00, 0x28, 0x00,
    0x00, 0x03, 0x05, 0x00, 0x03, 0x05, 0x00, 0x03, 0x05,
    0x1B, 0x03, 0x00, 0x0B, 0x03, 0x0B, 0x00, 0x00, 0x00,
    0x2C, 0x02, 0x00, 0x24, 0x02, 0x00, 0x24, 0x02, 0x00,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00,
    0x00, 0x16, 0x00, 0x00, 0x16, 0x00, 0x00, 0x16, 0x00,
    0x00, 0x17, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x21,
    0x00, 0x00, 0x17, 0x00, 0x00, 0x17, 0x24, 0x02, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x12, 0x00,
    0x14, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00,
    0x24, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00,
    0x13, 0x0A, 0x00, 0x00, 0x03, 0x0B, 0x00, 0x00, 0x00,
    0x1B, 0x18, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x13, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00,
    0x1B, 0x03, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x3B, 0x00, 0x00, 0x3B, 0x00, 0x12, 0x14, 0x00,
    0x0E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x05, 0x24, 0x02,
    0x03, 0x00, 0x25, 0x03, 0x00, 0x25, 0x03, 0x00, 0x25,
    0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20,
    0x00, 0x11, 0x05, 0x00, 0x11, 0x05, 0x00, 0x11, 0x05,
    0x00, 0x11, 0x25, 0x00, 0x11, 0x25, 0x00, 0x11, 0x25,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
    0x03, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x0E, 0x0F, 0x0F, 0x2A, 0x0F, 0x0F, 0x12, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x1B, 0x1C, 0x00, 0x00, 0x00, 0x00,
    0x03, 0x15, 0x00, 0x03, 0x15, 0x00, 0x03, 0x15, 0x00,
    0x1B, 0x02, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x02, 0x00,
    0x00, 0x00, 0x00, 0x03, 0x00, 0x12, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x03, 0x12, 0x12, 0x12, 0x12, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x23, 0x02,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x23, 0x02, 0x00,
    0x26, 0x27, 0x00, 0x28, 0x27, 0x00, 0x28, 0x27, 0x00,
    0x00, 0x26, 0x27, 0x00, 0x28, 0x27, 0x00, 0x28, 0x27,
    0x29, 0x2A, 0x27, 0x29, 0x2B, 0x27, 0x29, 0x2B, 0x3A,
    0x0E, 0x12, 0x12, 0x12, 0x00, 0x00, 0x10, 0x00, 0x00,
    0x0E, 0x12, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x00,
    0x00, 0x00, 0x00, 0x25, 0x00, 0x0E, 0x0F, 0x0F, 0x0F,
    0x0E, 0x0F, 0x0F, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x18, 0x00,
    0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x1D, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x1D, 0x00,
    0x1F, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x16, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x16, 0x05, 0x00, 0x16, 0x05, 0x00, 0x16, 0x05,
    0x00, 0x16, 0x02, 0x00, 0x16, 0x02, 0x00, 0x16, 0x02,
    0x03, 0x21, 0x02, 0x03, 0x21, 0x02, 0x03, 0x21, 0x02,
    0x18, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x1B, 0x03, 0x0B, 0x00, 0x00, 0x00,
    0x03, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x1B, 0x03, 0x3D, 0x00, 0x00, 0x00,
    0x24, 0x18, 0x03, 0x18, 0x05, 0x03, 0x18, 0x05, 0x00,
    0x03, 0x00, 0x32, 0x03, 0x00, 0x32, 0x03, 0x00, 0x32,
    0x24, 0x33, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
    0x00, 0x2C, 0x2A, 0x27, 0x13, 0x2B, 0x27, 0x00, 0x00,
    0x03, 0x25, 0x00, 0x03, 0x25, 0x00, 0x13, 0x09, 0x00,
    0x00, 0x3B, 0x05, 0x00, 0x3B, 0x05, 0x00, 0x3B, 0x05,
    0x00, 0x0D, 0x05, 0x00, 0x0D, 0x05, 0x00, 0x0D, 0x05,
    0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
    0x1B, 0x18, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x17, 0x00, 0x00, 0x17, 0x0E, 0x05, 0x0D, 0x02,
    0x18, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
    0x13, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00,
    0x0E, 0x0F, 0x02, 0x24, 0x25, 0x00, 0x24, 0x25, 0x00,
    0x00, 0x00, 0x00, 0x29, 0x0F, 0x0F, 0x0F, 0x12, 0x00,
    0x00, 0x29, 0x12, 0x00, 0x29, 0x3F, 0x00, 0x13, 0x0F,
    0x00, 0x3D, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x3D, 0x00,
    0x1B, 0x03, 0x00, 0x0B, 0x03, 0x0B, 0x13, 0x39, 0x24,
    0x0E, 0x02, 0x00, 0x24, 0x02, 0x00, 0x13, 0x07, 0x00,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
    0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
};
